package com.geostar.constructionland.attachment.entity;

import java.io.Serializable;

public class Folder  implements Serializable {
    
    private static final long serialVersionUID = -6411578106114414227L;

    /**
     * 系统来源唯一标识ID
     */
    private String indentifyId;
    
    /**
     * 用户ID
     */
    private String userId;
    
    /**
     * 分类名称
     */
    private String folderName;
    
    /**
     * 父节点Id
     */
    private String parentFolderId;
    
    /**
     * 创建时间 yyyy-MM-dd HH:mm:ss
     */
    private String creationTime;
    
    /**
     * 最后修改时间  yyyy-MM-dd HH:mm:ss 
     */
    private String lastModifyTime;
    
    /**
     * 是否删除0:否；1:已删除
     */
    private String isDeleted;
    
    /**
     * 是否共享 0：不同享；1：共享
     */
    private String isShare;
    
    /**
     * 数据源id
     */
    private String sourceId;
    
    public Folder() {
        super();
    }

    public Folder(String indentifyId, String userId, String folderName,
            String parentFolderId, String creationTime, String lastModifyTime,
            String isDeleted, String isShare, String sourceId) {
        super();
        this.indentifyId = indentifyId;
        this.userId = userId;
        this.folderName = folderName;
        this.parentFolderId = parentFolderId;
        this.creationTime = creationTime;
        this.lastModifyTime = lastModifyTime;
        this.isDeleted = isDeleted;
        this.isShare = isShare;
        this.sourceId = sourceId;
    }

    public String getIsShare() {
        return isShare;
    }

    public void setIsShare(String isShare) {
        this.isShare = isShare;
    }

    public String getIndentifyId() {
        return indentifyId;
    }
    
    public void setIndentifyId(String indentifyId) {
        this.indentifyId = indentifyId;
    }
    
    public String getUserId() {
        return userId;
    }
    
    public void setUserId(String userId) {
        this.userId = userId;
    }
    
    public String getFolderName() {
        return folderName;
    }
    
    public String getFolderNamePlus() {
        return folderName + "/";
    }
    
    public void setFolderName(String folderName) {
        String temp = folderName;
        //去除末尾"/"
        if (temp.endsWith("/")){
            temp = temp.substring(0, temp.lastIndexOf("/"));
        }
        this.folderName = temp;
    }
    
    public String getParentFolderId() {
        return parentFolderId;
    }
    
    public void setParentFolderId(String parentFolderId) {
        this.parentFolderId = parentFolderId;
    }
    
    public String getCreationTime() {
        return creationTime;
    }
    
    public void setCreationTime(String creationTime) {
        this.creationTime = creationTime;
    }
    
    public String getLastModifyTime() {
        return lastModifyTime;
    }
    
    public void setLastModifyTime(String lastModifyTime) {
        this.lastModifyTime = lastModifyTime;
    }
    
    public String getIsDeleted() {
        return isDeleted;
    }
    
    public void setIsDeleted(String isDeleted) {
        this.isDeleted = isDeleted;
    }

	public String getSourceId() {
		return sourceId;
	}

	public void setSourceId(String sourceId) {
		this.sourceId = sourceId;
	}

	@Override
	public String toString() {
		return "Folder [indentifyId=" + indentifyId + ", userId=" + userId
				+ ", folderName=" + folderName + ", parentFolderId="
				+ parentFolderId + ", creationTime=" + creationTime
				+ ", lastModifyTime=" + lastModifyTime + ", isDeleted="
				+ isDeleted + ", isShare=" + isShare + ", sourceId=" + sourceId
				+ "]";
	}    
    
}
